public class MethodOverloading {
    
    // 方法重载：同名方法，参数不同
    public static int multiply(int a, int b) {
        return a * b;
    }
    
    public static double multiply(double a, double b) {
        return a * b;
    }
    
    public static int multiply(int a, int b, int c) {
        return a * b * c;
    }
    
    public static void main(String[] args) {
        System.out.println("两个整数相乘: " + multiply(3, 4));
        System.out.println("两个浮点数相乘: " + multiply(3.5, 2.5));
        System.out.println("三个整数相乘: " + multiply(2, 3, 4));
    }
}
